<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Comment extends Model
{
    use HasFactory;
	
	protected $primaryKey = 'comment_id';
	
	protected $fillable = [
        'fcomment_id', 'art_id','comment','user_id','username','email','created_at','ip','status'
    ];
	
	protected $casts = [
        'created_at'   => 'datetime:Y-m-d H:i:s',
        'updated_at'   => 'datetime:Y-m-d H:i:s',
    ];
	
	public function art()
    {
        return $this->hasOne(Art::class,'art_id','art_id');
    }
	
}
